<?php
/**
 * @author Amissah Gideon<kuulmek@yahoo.com>
 * @access public
 * @version 1.0
 */

?>
<script type="text/javascript">
    var gbl_customers_sales = <?php echo json_encode($customers_sales); ?>;
    var gbl_currency_opts = <?php echo json_encode($currency_opts); ?>;
    //console.log(global_equipment_data);
</script>

<!-- Main content -->
<section role="main" id="main">

    <!-- Header -->
    <?php
    echo $this->element('page_header');
    echo $this->element('navigations/report_navbar');
    ?>

    <div class="with-padding">
        <div class="columns">
            <div class="new-row-mobile twelve-columns six-columns-tablet twelve-columns-mobile">

                <h3 class="thin underline">Debtors Report</h3>

                <table id="flex" style="display:none;"></table>


                <form id="print-export-form" method="post" action="<?php echo $this->Html->url(array('controller' => 'Report', 'action' => 'print_export_debtors')); ?>" target="PrintExportWindow">
                    <input type="hidden" name="data_type" id="data_type" value="" />
                    <input type="hidden" name="data_ids" id="data_ids"  value="" />
                    <input type="hidden" name="pe_currency" id="pe_currency"  value="" />
                    <input type="hidden" name="pe_customer_id" id="pe_customer_id"  value="" />
                </form>

            </div>
        </div>
    </div>

</section>
<!-- End main content -->

<!-- Side tabs shortcuts -->
<?php echo $this->element('side_tabs_shortcuts'); ?>
<!-- Sidebar/drop-down menu -->
<?php echo $this->element('right_side_infos'); ?>

<!-- Users URL -->
<input type="hidden" id="table-url" value="<?php echo $this->Html->url(array('controller' => 'Report', 'action' => 'get_debtors')); ?>"/>
<input type="hidden" id="add-edit-url" value="<?php echo $this->Html->url(array('controller' => 'Report', 'action' => 'add')); ?>"/>
<input type="hidden" id="load-user-url" value="<?php echo $this->Html->url(array('controller' => 'Report', 'action' => 'load')); ?>"/>
<input type="hidden" id="repayment-url" value="<?php echo $this->Html->url(array('controller' => 'Report', 'action' => 'repayment_details')); ?>"/>
<input type="hidden" id="amortization-url" value="<?php echo $this->Html->url(array('controller' => 'Report', 'action' => 'amortization')); ?>"/>
<input type="hidden" id="print-export-debtors-url" value="<?php echo $this->Html->url(array('controller' => 'Report', 'action' => 'print_export_debtors')); ?>"/>

<?php
echo $this->Html->script('setup.js');

/** Template functions **/
echo $this->Html->script('developr.input.js');
echo $this->Html->script('developr.message.js');
echo $this->Html->script('developr.modal.js');
echo $this->Html->script('developr.navigable.js');
echo $this->Html->script('developr.notify.js');
echo $this->Html->script('developr.scroll.js');
echo $this->Html->script('developr.progress-slider.js');
echo $this->Html->script('developr.tooltip.js');
echo $this->Html->script('developr.confirm.js');
echo $this->Html->script('developr.agenda.js');
echo $this->Html->script('developr.tabs.js');

echo $this->Html->script('libs/tinycon.min.js');
echo $this->Html->script('jquery.thfloat-0.3.min.js');
echo $this->Html->script('custom-scripts/deptors.js');
?>